export default class Monster{
    constructor(x,y){
        this.x=x;
        this.y=y;
    }

    //在x，y坐标位置画出角色
    drawMonster(ctx){
        let img = new Image();
        img.src = './images/monster.svg';
        console.log("position: " + this.x + " " + this.y)
        img.onload = () => {
            ctx.drawImage(img, 5 + 50 * this.x, 5 + 50 * this.y, img.width * 0.2, img.height * 0.2);
        }
    }
}